Hello, |
Re: Measure pixel width of a string? I suppose you could, however, have some ascii character lookup table that would return how "wide" a character is, on average, independant of font. Perhaps A "W" might me width 12, "w" width 10, and "i" width 3. Then send a function the string, have it evaluate each letting, and return the width. You could perhaps develope the width of each character by perhaps putting 40 of them in a row and figuring out how wide that is, then deviding by 40. WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii You know, I may just do this as sometimes I want to pad a string with spaces before adding a tab, so information displayed in my reports lines up right.
|